module MC.UI {
    export class size {
        public constructor() {
            /*if (!$('.H5body')[0]) {
                return;
            }*/
            //   return; 

            //窗口大小改变时，执行
            $(window).resize(() => {
                //执行代码块
                this.resize();
            });
            this.resize();
            setTimeout(() => {
                this.resize();
            }, 100);

        }

        private resize() {
            var w = $(window).width();
            if(w>=600){
                w=600;
            }
            var _W =375;// 750;
            var scale = w / _W;
            if(scale>0.7){
              //  scale=0.7;
            }
            if(scale<0.36){
              //  scale=0.36;
            }

           $('html').css('font-size', scale * 100 + 'px');
        }
    }
}